#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        int dest = -1;
        int src = 0;
        while (src < nums.size())
        {
            if (nums[src] != 0)
            {
                dest++;
                swap(nums[src], nums[dest]);
            }
            src++;
        }
    }
};